#pragma once
#include<iostream>
#include<unistd.h>
class Channel {
public:
    Channel(int fd,pid_t pid):_fd(fd),_pid(pid){};
    void Close(){
        ::close(_fd);
    }
    void Send(int s){
        ::write(_fd,&s,4);
    }
    int Fd(){
        return _fd;
    }
    pid_t Pid(){
        return _pid;
    }
    ~Channel(){}
private:
    int _fd;
    pid_t _pid;
};